
<template>
  <div class="Temporary">
    <div class="Temporary-l">
       <InfoCar :CarListInfo='CarListInfo' class="Temporary-l-bed"></InfoCar>
       <InfoCar :CarListInfo='CarListDate'></InfoCar>
    </div>
    <div class="Temporary-r">
      <InfoTit title="临时医嘱"></InfoTit>
      <div class="trug-list">
        <table>
          <thead>
            <tr>
              <!--<td>类别</td>
              <td>医嘱序号</td>
              <td>子序号</td>
              <td>医嘱正文</td>
              <td>剂量</td>
              <td>单位</td>
              <td>频率</td>-->
              <td>开立医嘱时间</td>
              <td>停止医嘱时间</td>
              <td>医嘱名称</td>
              <td>用法</td>
              <td>频次</td>
            </tr>
          </thead>
          <tbody class="tbody">
            <tr v-for="(item) in tableList"
              :key="item.id"
            >
              <!--<th>{{item.order_class}}</th>
              <th>{{item.order_no}}</th>
              <th>{{item.ordersub_no}}</th>
              <th>{{item.order_text}}</th>
              <th>{{item.drugs_dose}}</th>
              <th>{{item.dose_nuit}}</th>
              <th>{{item.freq_name}}</th>-->
              <th>{{item.start_time}}</th>
              <th>{{item.stop_time}}</th>
              <th>{{item.order_text}}</th>
              <th>{{item.freq_id}}</th>
              <th>{{item.freq_name}}</th>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</template>

<script>
import InfoCar from '../common/InfoCar'
import InfoTit from '../common/InfoTit'
import TableBody from '../common/TableBody'
import axios from 'axios'
import urls from '../../common'
export default {
  name: 'Temporary',
  components: {
    InfoCar,
    InfoTit,
    TableBody
  },
  data () {
    return {
      CarListInfo: {
        src: require('../../img/wardR/chest-icon.png'),
        InfoTit: this.$store.state.personinfo.belong_dpname,
        decide: true,
        bgImg: require('../../img/wardR/aid-bg.png'),
        boxS: '-.1rem -.1rem .3rem 0 #d5e9e6',
        InfoCon: ['x', '27', '床']
      },
      CarListDate: {
        src: require('../../img/wardR/chest-icon.png'),
        InfoTit: '当前系统日期',
        decide: false,
        bgImg: require('../../img/wardR/present-bg.png'),
        boxS: '-.1rem -.1rem .3rem 0 #d5e9e6',
        InfoCon: ['x', '27', '床']
      },
      tableList: []
    }
  },
  methods: {
    orderList () {
      axios.get(urls.ordersList + '/' + this.$store.state.personinfo.pa_id + '/' + this.$store.state.personinfo.in_time + '/0')
        .then((res) => {
          if (res.data.code === '200') {
            this.tableList = res.data.data.list
          }
        })
    }
  },
  mounted () {
    this.orderList()
  }
}
</script>

<style style="stylus" scoped>
  .Temporary{
    padding: 0 .3rem;
    display: flex;
  }

  .Temporary .Temporary-l .Temporary-l-bed{
     margin-bottom: .1rem;
  }

  .Temporary .Temporary-r{
    margin-left:.3rem;
    padding: 0 .2rem;
    flex: 1;
    background: #fff;
    border-radius: 0.1rem;
    box-shadow: 0px 0.11rem 0.24rem 0px rgba(127, 135, 143, 0.1);
  }
  .Temporary .Temporary-r .trug-list{
    width: 100%;
    font-size: .28rem;
  }
  .Temporary .Temporary-r .trug-list table{
    width: 100%;
    text-align: center;
    font-size: .24rem;
  }
  .Temporary .Temporary-r .trug-list>table>thead{
    text-align: center;
    background-color: #edeef0;
    color: #161d26;
    height: .56rem;
    line-height: .56rem;
    display:table;
    width:100%;
    table-layout:fixed;
  }
   .Temporary .Temporary-r .trug-list .tbody{
    display: inline-block;
    height: 7rem;
    overflow-y:scroll;
    -webkit-overflow-scrolling: touch
  }
    .Temporary .Temporary-r .trug-list .tbody{
      font-size: 0.2rem;
      font-weight: normal
    }
   .Temporary .Temporary-r .trug-list .tbody::-webkit-scrollbar {
    display: none;
  }
   .Temporary .Temporary-r .trug-list .tbody tr{
      display:table;
      width:100%;
      height: .58rem;
      border-bottom: .01rem solid #e8e9ee;
      table-layout:fixed;
      color: #6c7580;
    }
</style>
